home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: 100754.2730@compuserve.com (Martin Aupperle)
- Newsgroups: comp.lang.c++
- Subject: Re: Exception handling Borland C++ 4.53
- Date: Thu, 11 Jan 1996 11:53:30 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4d2u23$rul@dub-news-svc-5.compuserve.com>
- References: <30E739B6.3294@worldlink.ca>
- NNTP-Posting-Host: ad71-132.compuserve.com
- X-Newsreader: Forte Free Agent v0.56
-
- Norbert HachΘ <patsalou@worldlink.ca> wrote:
-
- >I am currently developping a windows application using Borland C++ 4.53.
- >I am using OWL and making extensive usage of exception handling of my
- >own. What I would like to do is to write a central error handler in my
- >OwlMain() function. Unfortunately, event response functions, such as
- >EvLButtonDown() etc are called by the Windows environment, not by a
- >function of my application, so when I throw errors from inside one of
- >these response function, it never makes it to my OwlMain function. Does
- >anyone know a trick that allows to centralise the error handler in only
- >one place (ie I dont want a complete error handler in all my response
- >functions, I think it defeats the purpose of exception handling).
-
- I do not use OWL, I use zApp, but this should make no difference for
- your problem.
- zApp has a go-routine that user code has to call to start the event
- loop. I put this function call in a try block and the following
- handler correctly catches all uncaught exceptions from all callback
- functions. Please note that this is not guaranteed to work (since
- functions not compiled with exception handling enabled may be in the
- call chain (e.g. Windows functions) ), but it works fine for zApp,
- Windows and X/Motif.
-
- I don't know OWL, but sure there is a function that starts event
- processing which you can put in a try-block.
-
- Martin
- -----------------------------------
- Signatures are a waste of bandwidth
- -----------------------------------
-
-